from meiduo01.models import *
from rest_framework.serializers import ModelSerializer
from rest_framework import serializers


#三级商品展示序列化器
class HomeManageSer(ModelSerializer):
    class Meta:
        model =Category
        fields = '__all__'

#商品序列化器
class GoodsSer(ModelSerializer):
    class Meta:
        model =Goods
        fields = '__all__'
#购物车添加
class CartSer(ModelSerializer):
    class Meta:
        model =Cart
        fields = '__all__'


#展示购物车
class ShowCartSer(ModelSerializer):
    goods = GoodsSer()
    class Meta:
        model =Cart
        fields = '__all__'

 #订单表序列化器
class OrdernoSer(ModelSerializer):
    class Meta:
        model =OrderInfo
        fields = '__all__'

#订单表详情序列化器
class OrderdetailSer(ModelSerializer):
    class Meta:
        model =OrderDetail
        fields = '__all__'


